<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>传感器基本信息管理</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript">
		$(document).ready(function() {
			//$("#name").focus();
			$("#inputForm").validate({
				submitHandler: function(form){
					loading('正在提交，请稍等...');
					form.submit();
				},
				errorContainer: "#messageBox",
				errorPlacement: function(error, element) {
					$("#messageBox").text("输入有误，请先更正。");
					if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
						error.appendTo(element.parent().parent());
					} else {
						error.insertAfter(element);
					}
				}
			});
		});
	</script>
</head>
<body>
	<ul class="nav nav-tabs">
		<li><a href="${ctx}/ccseninfo/sensorInfo/">传感器基本信息列表</a></li>
		<li class="active"><a href="${ctx}/ccseninfo/sensorInfo/form?id=${sensorInfo.id}">传感器基本信息<shiro:hasPermission name="ccseninfo:sensorInfo:edit">${not empty sensorInfo.id?'修改':'添加'}</shiro:hasPermission><shiro:lacksPermission name="ccseninfo:sensorInfo:edit">查看</shiro:lacksPermission></a></li>
	</ul><br/>
	<form:form id="inputForm" modelAttribute="sensorInfo" action="${ctx}/ccseninfo/sensorInfo/save" method="post" class="form-horizontal">
		<form:hidden path="id"/>
		<sys:message content="${message}"/>		
		<div class="control-group">
			<label class="control-label">传感器MAC地址：</label>
			<div class="controls">
				<form:input path="sensorMac" htmlEscape="false" maxlength="64" class="input-xlarge required"/>
				<span class="help-inline"><font color="red">*</font> </span>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">所属设备MAC地址：</label>
			<div class="controls">
				<form:input path="gwMac" htmlEscape="false" maxlength="64" class="input-xlarge "/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">类别（01-单温探头、02-单温标签、03-温湿度探头、04-温湿度标签）：</label>
			<div class="controls">
				<form:input path="type" htmlEscape="false" maxlength="64" class="input-xlarge "/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">所属设备（冷链设备名称+出厂编号）：</label>
			<div class="controls">
				<form:input path="device" htmlEscape="false" maxlength="255" class="input-xlarge "/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">设备状态（正常/报废/停用/维修/日常化霜/盘苗等）：</label>
			<div class="controls">
				<form:input path="deviceStatus" htmlEscape="false" maxlength="255" class="input-xlarge "/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">传感器名称：</label>
			<div class="controls">
				<form:input path="sensorName" htmlEscape="false" maxlength="64" class="input-xlarge "/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">型号（无线、型号1、型号2、便携式）：</label>
			<div class="controls">
				<form:input path="modelNumber" htmlEscape="false" maxlength="64" class="input-xlarge "/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">温度上限：</label>
			<div class="controls">
				<form:input path="upperTemp" htmlEscape="false" maxlength="20" class="input-xlarge  number"/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">温度下限：</label>
			<div class="controls">
				<form:input path="lowerTemp" htmlEscape="false" maxlength="20" class="input-xlarge  number"/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">湿度上限：</label>
			<div class="controls">
				<form:input path="upperHumi" htmlEscape="false" maxlength="20" class="input-xlarge  number"/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">湿度下限：</label>
			<div class="controls">
				<form:input path="lowerHumi" htmlEscape="false" maxlength="20" class="input-xlarge  number"/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">测量周期(分钟)：</label>
			<div class="controls">
				<form:input path="measureInterval" htmlEscape="false" maxlength="20" class="input-xlarge  digits"/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">温度报警周期：</label>
			<div class="controls">
				<form:input path="tempalarmInterval" htmlEscape="false" maxlength="20" class="input-xlarge  digits"/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">湿度报警周期：</label>
			<div class="controls">
				<form:input path="humialarmInterval" htmlEscape="false" maxlength="20" class="input-xlarge  digits"/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">断电报警周期(分钟)：</label>
			<div class="controls">
				<form:input path="poweroffalarmInterval" htmlEscape="false" maxlength="20" class="input-xlarge  digits"/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">延迟报警次数：</label>
			<div class="controls">
				<form:input path="delayalarmCount" htmlEscape="false" maxlength="20" class="input-xlarge  digits"/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">多级报警次数：</label>
			<div class="controls">
				<form:input path="multialarmCount" htmlEscape="false" maxlength="20" class="input-xlarge  digits"/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">温度校正值：</label>
			<div class="controls">
				<form:input path="tempcheckValue" htmlEscape="false" maxlength="20" class="input-xlarge  digits"/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">多级报警类型（本级报警、多级报警、上级报警）：</label>
			<div class="controls">
				<form:input path="multialarmType" htmlEscape="false" maxlength="64" class="input-xlarge "/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">忽略报警:报警、不报警、报警不发送：</label>
			<div class="controls">
				<form:input path="ignoreAlarm" htmlEscape="false" maxlength="64" class="input-xlarge "/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">是否低电压报警： 1：报警 2：不报警，默认：1：</label>
			<div class="controls">
				<form:input path="lowvoltageAlarm" htmlEscape="false" maxlength="64" class="input-xlarge "/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">低电压报警触发阈值：</label>
			<div class="controls">
				<form:input path="lowvoltageValue" htmlEscape="false" maxlength="20" class="input-xlarge  number"/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">是否设备中断报警: 1:报警，2：不报警，默认1：</label>
			<div class="controls">
				<form:input path="interruptAlarm" htmlEscape="false" maxlength="64" class="input-xlarge "/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">设备中断报警触发的时间间隔(分钟)：</label>
			<div class="controls">
				<form:input path="interruptInterval" htmlEscape="false" maxlength="20" class="input-xlarge  digits"/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">标签号：1-100：</label>
			<div class="controls">
				<form:input path="labelNumber" htmlEscape="false" maxlength="18" class="input-xlarge  digits"/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">是否启用: 1：启用，2：不启用，默认1：</label>
			<div class="controls">
				<form:input path="status" htmlEscape="false" maxlength="10" class="input-xlarge "/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">是否启用语音报警：0：启用，1：不启用：</label>
			<div class="controls">
				<form:input path="voiceAlarm" htmlEscape="false" maxlength="10" class="input-xlarge "/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">备注：</label>
			<div class="controls">
				<form:textarea path="remarks" htmlEscape="false" rows="4" maxlength="255" class="input-xxlarge "/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">冷链设备ID：</label>
			<div class="controls">
				<form:input path="equipmentId" htmlEscape="false" maxlength="50" class="input-xlarge "/>
			</div>
		</div>
		<div class="form-actions">
			<shiro:hasPermission name="ccseninfo:sensorInfo:edit"><input id="btnSubmit" class="btn btn-primary" type="submit" value="保 存"/>&nbsp;</shiro:hasPermission>
			<input id="btnCancel" class="btn" type="button" value="返 回" onclick="history.go(-1)"/>
		</div>
	</form:form>
</body>
</html>